package com.juzishuke.margin.feign.sample.api;


import com.juzishuke.margin.base.dto.bill.req.RepayPlanSearchReq;
import com.juzishuke.margin.base.dto.bill.res.RepayPlanDTO;
import com.juzishuke.margin.common.response.MarginResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 保证金基础服务还款计划接口
 *
 * 1 消费者pom中可引入该模块(margin-base-api) 降低代码书写错误
 * 业务系统可继承该接口 例如
 *
 * @FeignClient("margin-base-provider")
 * public interface MarginBaseProviderClient extends MarginBaseAPI {
 * }
 * 2 消费者也可以使用其他方式
 *
 * @date 2024-03-15 10:02
 */

@FeignClient(value = "margin-feign-sample1")
public interface FeignSample {
    
    @PostMapping(value = "/margin/repayPlan/query")
    MarginResponse<List<RepayPlanDTO>> getRepayPlan(@RequestBody RepayPlanSearchReq repayPlanSearchReq);

}
